package com.ale.oxetool.service;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;



import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import java.io.IOException;
import java.net.URISyntaxException;

/**
 * Created by wgs on 4/12/2016.
 */
@Component
public class EmbeddedRedis {

    @Value("${spring.redis.port}")
    private int redisPort;


    @PostConstruct
    public void startRedis() throws IOException, URISyntaxException {
//        redisServer = new RedisServer(redisPort).builder().setting("maxheap 256M").build();
//        redisServer.start();
    }

    @PreDestroy
    public void stopRedis() throws InterruptedException {
//        redisServer.stop();
    }
}
